package org.springblade.modules.notice.utils;

import org.springblade.modules.notice.enums.IdType;
import org.springblade.modules.notice.enums.PushObjectEnum;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author ysq
 * @Date 2024/11/28
 * @Description 群组id映射
 */
public class GroupIdMappingUtil {

	/**
	 * 根据推送对象类型和id类型生成对应接收对象组
	 * @return
	 */
	public static List<String> getAllPushObjectGroupIds() {
		List<String> groupIds = new ArrayList<>();
		for (PushObjectEnum pushObject : PushObjectEnum.values()) {
			for (IdType idType : IdType.values()) {
				String groudId = String.format("P_%s_%s", pushObject.getCode(), idType.getCode());
				groupIds.add(groudId);
			}
		}
		return groupIds;
	}
}
